Skip to content

refactor: migrate source files to TypeScript (.ts) - #3

Merged
codebygarv merged 10 commits into
mainfrom
EL-changing-files-to-ts
Jul 31, 2026
Merged

refactor: migrate source files to TypeScript (.ts)#3
codebygarv merged 10 commits into
mainfrom
EL-changing-files-to-ts

Conversation

@codebygarv

Copy link
Copy Markdown
Owner

Summary

This Pull Request migrates all source files in src/ and index.js to strict TypeScript (.ts).

Resolves #2

Changes Included

  • src/utils.ts: Added RequestPayload interface, percentile math, and cURL generator.
  • src/system.ts: Added SystemMetrics interface and cached OS metrics reader.
  • src/store.ts: Added StoreMetrics, RequestEntry, RouteStats, and AlertTrigger interfaces.
  • src/middleware.ts: Added ExpressLensOptions interface and middleware handler.
  • src/prometheus.ts: Added TypeScript annotations for Prometheus exposition format.
  • src/dashboard.ts: Added TypeScript annotations for embedded HTML UI and SSE stream.
  • index.ts: Primary TypeScript entry point.
  • tsup.config.ts & tsconfig.json: Added build configuration and npm run typecheck (tsc --noEmit).

Verification

  • npm run typecheck (0 errors)
  • npm test (25/25 tests passing)
  • npm run build (ESM, CJS, and .d.ts bundles built)

@codebygarv
codebygarv merged commit 49fc78f into main Jul 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: migrate source files from JavaScript to TypeScript (.ts)

1 participant